﻿
using Newtonsoft.Json;

namespace Onetube.Entities.ChannelMostViewedQuery
{

    public class Id
    {

        [JsonProperty("$t")]
        public string T { get; set; }
    }

    public class Updated
    {

        [JsonProperty("$t")]
        public string T { get; set; }
    }

    public class Category
    {

        [JsonProperty("scheme")]
        public string Scheme { get; set; }

        [JsonProperty("term")]
        public string Term { get; set; }
    }

    public class Title
    {

        [JsonProperty("$t")]
        public string T { get; set; }
    }

    public class Logo
    {

        [JsonProperty("$t")]
        public string T { get; set; }
    }

    public class Link
    {

        [JsonProperty("rel")]
        public string Rel { get; set; }

        [JsonProperty("type")]
        public string Type { get; set; }

        [JsonProperty("href")]
        public string Href { get; set; }
    }

    public class Name
    {

        [JsonProperty("$t")]
        public string T { get; set; }
    }

    public class Uri
    {

        [JsonProperty("$t")]
        public string T { get; set; }
    }

    public class Author
    {

        [JsonProperty("name")]
        public Name Name { get; set; }

        [JsonProperty("uri")]
        public Uri Uri { get; set; }
    }

    public class Generator
    {

        [JsonProperty("$t")]
        public string T { get; set; }

        [JsonProperty("version")]
        public string Version { get; set; }

        [JsonProperty("uri")]
        public string Uri { get; set; }
    }

    public class OpenSearchTotalResults
    {

        [JsonProperty("$t")]
        public int T { get; set; }
    }

    public class OpenSearchStartIndex
    {

        [JsonProperty("$t")]
        public int T { get; set; }
    }

    public class OpenSearchItemsPerPage
    {

        [JsonProperty("$t")]
        public int T { get; set; }
    }

    public class Id2
    {

        [JsonProperty("$t")]
        public string T { get; set; }
    }

    public class Updated2
    {

        [JsonProperty("$t")]
        public string T { get; set; }
    }

    public class Category2
    {

        [JsonProperty("scheme")]
        public string Scheme { get; set; }

        [JsonProperty("term")]
        public string Term { get; set; }
    }

    public class Title2
    {

        [JsonProperty("$t")]
        public string T { get; set; }
    }

    public class Summary
    {

        [JsonProperty("$t")]
        public string T { get; set; }
    }

    public class Link2
    {

        [JsonProperty("rel")]
        public string Rel { get; set; }

        [JsonProperty("type")]
        public string Type { get; set; }

        [JsonProperty("href")]
        public string Href { get; set; }
    }

    public class Name2
    {

        [JsonProperty("$t")]
        public string T { get; set; }
    }

    public class Uri2
    {

        [JsonProperty("$t")]
        public string T { get; set; }
    }

    public class YtUserId
    {

        [JsonProperty("$t")]
        public string T { get; set; }
    }

    public class Author2
    {

        [JsonProperty("name")]
        public Name2 Name { get; set; }

        [JsonProperty("uri")]
        public Uri2 Uri { get; set; }

        [JsonProperty("yt$userId")]
        public YtUserId YtUserId { get; set; }
    }

    public class YtChannelId
    {

        [JsonProperty("$t")]
        public string T { get; set; }
    }

    public class YtChannelStatistics
    {

        [JsonProperty("commentCount")]
        public string CommentCount { get; set; }

        [JsonProperty("subscriberCount")]
        public string SubscriberCount { get; set; }

        [JsonProperty("totalUploadViewCount")]
        public string TotalUploadViewCount { get; set; }

        [JsonProperty("videoCount")]
        public string VideoCount { get; set; }

        [JsonProperty("viewCount")]
        public string ViewCount { get; set; }
    }

    public class MediaThumbnail
    {

        [JsonProperty("url")]
        public string Url { get; set; }

        [JsonProperty("yt$name")]
        public string YtName { get; set; }
    }

    public class MediaTitle
    {

        [JsonProperty("$t")]
        public string T { get; set; }
    }

    public class MediaGroup
    {

        [JsonProperty("media$thumbnail")]
        public MediaThumbnail[] MediaThumbnail { get; set; }

        [JsonProperty("media$title")]
        public MediaTitle MediaTitle { get; set; }
    }

    public class Entry
    {

        [JsonProperty("id")]
        public Id2 Id { get; set; }

        [JsonProperty("updated")]
        public Updated2 Updated { get; set; }

        [JsonProperty("category")]
        public Category2[] Category { get; set; }

        [JsonProperty("title")]
        public Title2 Title { get; set; }

        [JsonProperty("summary")]
        public Summary Summary { get; set; }

        [JsonProperty("link")]
        public Link2[] Link { get; set; }

        [JsonProperty("author")]
        public Author2[] Author { get; set; }

        [JsonProperty("yt$channelId")]
        public YtChannelId YtChannelId { get; set; }

        [JsonProperty("yt$channelStatistics")]
        public YtChannelStatistics YtChannelStatistics { get; set; }

        [JsonProperty("media$group")]
        public MediaGroup MediaGroup { get; set; }
    }

    public class Feed
    {

        [JsonProperty("xmlns")]
        public string Xmlns { get; set; }

        [JsonProperty("xmlns$media")]
        public string XmlnsMedia { get; set; }

        [JsonProperty("xmlns$openSearch")]
        public string XmlnsOpenSearch { get; set; }

        [JsonProperty("xmlns$gd")]
        public string XmlnsGd { get; set; }

        [JsonProperty("xmlns$yt")]
        public string XmlnsYt { get; set; }

        [JsonProperty("gd$etag")]
        public string GdEtag { get; set; }

        [JsonProperty("id")]
        public Id Id { get; set; }

        [JsonProperty("updated")]
        public Updated Updated { get; set; }

        [JsonProperty("category")]
        public Category[] Category { get; set; }

        [JsonProperty("title")]
        public Title Title { get; set; }

        [JsonProperty("logo")]
        public Logo Logo { get; set; }

        [JsonProperty("link")]
        public Link[] Link { get; set; }

        [JsonProperty("author")]
        public Author[] Author { get; set; }

        [JsonProperty("generator")]
        public Generator Generator { get; set; }

        [JsonProperty("openSearch$totalResults")]
        public OpenSearchTotalResults OpenSearchTotalResults { get; set; }

        [JsonProperty("openSearch$startIndex")]
        public OpenSearchStartIndex OpenSearchStartIndex { get; set; }

        [JsonProperty("openSearch$itemsPerPage")]
        public OpenSearchItemsPerPage OpenSearchItemsPerPage { get; set; }

        [JsonProperty("entry")]
        public Entry[] Entry { get; set; }
    }

    public class ChannelMostViewedQueryResult
    {

        [JsonProperty("version")]
        public string Version { get; set; }

        [JsonProperty("encoding")]
        public string Encoding { get; set; }

        [JsonProperty("feed")]
        public Feed Feed { get; set; }
    }

}
